/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package CarProject.impl;

import CarProject.CarProjectPackage;
import CarProject.Champs;
import CarProject.cle;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>cle</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link CarProject.impl.cleImpl#getChamps <em>Champs</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public abstract class cleImpl extends EObjectImpl implements cle {
	/**
	 * The cached value of the '{@link #getChamps() <em>Champs</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getChamps()
	 * @generated
	 * @ordered
	 */
	protected Champs champs;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected cleImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EClass eStaticClass() {
		return CarProjectPackage.Literals.CLE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Champs getChamps() {
		if (champs != null && champs.eIsProxy()) {
			InternalEObject oldChamps = (InternalEObject)champs;
			champs = (Champs)eResolveProxy(oldChamps);
			if (champs != oldChamps) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, CarProjectPackage.CLE__CHAMPS, oldChamps, champs));
			}
		}
		return champs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Champs basicGetChamps() {
		return champs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setChamps(Champs newChamps) {
		Champs oldChamps = champs;
		champs = newChamps;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CarProjectPackage.CLE__CHAMPS, oldChamps, champs));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CarProjectPackage.CLE__CHAMPS:
				if (resolve) return getChamps();
				return basicGetChamps();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CarProjectPackage.CLE__CHAMPS:
				setChamps((Champs)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void eUnset(int featureID) {
		switch (featureID) {
			case CarProjectPackage.CLE__CHAMPS:
				setChamps((Champs)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CarProjectPackage.CLE__CHAMPS:
				return champs != null;
		}
		return super.eIsSet(featureID);
	}

} //cleImpl
